<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <!--<div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Uid')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-uid" data-rule="required" class="form-control" name="row[uid]" type="number" value="{$row.uid|htmlentities}">
        </div>
    </div>-->

    <input id="c-id" type="hidden" name="row[id]" value="{$row.id}">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('床位')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-room_info_id" data-rule="required" class="form-control" name="row[room_info]">
                <option value="0">系统自动分配</option>
                {volist name="roomList" id="item"}
                <option value="{$item['id']},{$item['room_type']}" {eq name="$item['room_info']" value="$row.room_info"}selected{/eq}>{$item['floor']}房间 - {$item['room_no']}号床位</option>
                {/volist}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Disease_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-disease_id" data-rule="required" class="form-control" name="row[disease_id]">
                {volist name="category" id="item"}
                <option value="{$item['id']}" {in name="$item['id']" value="$row.disease_id"}selected{/in}>{$item['name']}</option>
                {/volist}
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Stay_date')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-stay_date" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[stay_date]" type="text" value="{$row.stay_date}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Stay_days')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-stay_days" data-rule="required" class="form-control" step="0.1" name="row[stay_days]" type="number" value="{$row.stay_days|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Patient_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-patient_name" data-rule="required" class="form-control" name="row[patient_name]" type="text" value="{$row.patient_name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Patient_cardno')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-patient_cardno" data-rule="required" class="form-control" name="row[patient_cardno]" type="text" value="{$row.patient_cardno|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Accompany_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-accompany_name" data-rule="required" class="form-control" name="row[accompany_name]" type="text" value="{$row.accompany_name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Accompany_cardno')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-accompany_cardno" data-rule="required" class="form-control" name="row[accompany_cardno]" type="text" value="{$row.accompany_cardno|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Accompany_mobile')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-accompany_mobile" data-rule="required" class="form-control" name="row[accompany_mobile]" type="text" value="{$row.accompany_mobile|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="c-status" data-rule="required" class="form-control" name="row[status]">
                <option value="0" {$row.status == 0 ? "selected" : ""}>待审核</option>
                <option value="1" {$row.status == 1 ? "selected" : ""}>审核通过</option>
                <option value="2" {$row.status == 2 ? "selected" : ""}>审核驳回</option>
<!--                <option value="3" {$row.status == 3 ? "selected" : ""}>用户已取消</option>-->
            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Reject_reason')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-reject_reason" class="form-control" name="row[reject_reason]" type="text" value="{$row.reject_reason|htmlentities}" placeholder="更改状态为驳回时需填">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Memo')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-memo" class="form-control" name="row[memo]" type="text" value="{$row.memo|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Create_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-create_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[create_time]" type="text" value="{:$row.create_time?datetime($row.create_time):''}">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="button" id="submitBth" class="btn btn-success btn-embossed">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
<script>
    let status = parseInt("{$row.status}");
</script>

